﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace GiaoDien
{
    public partial class WebForm6 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void DangKy_Click(object sender, EventArgs e)
        {
            ServiceKD.KhachHang temp = new GiaoDien.ServiceKD.KhachHang();
            temp.email = txtEmail.Text;
            temp.tenDangNhap = txtTenTaiKhoan.Text;
            temp.matKhau = txtMatKhau.Text;
            temp.soDienThoai = txtSoDienThoai.Text;
            temp.tenKhachHang = "dienkhung";
            temp.maTaiKhoanNghanHang = 0;
            temp.diaChi = "";
            temp.maPhanQuyen = 2;

            ServiceKD.ServiceSoapClient proxy = new GiaoDien.ServiceKD.ServiceSoapClient("ServiceSoap");
            int kq = proxy.dangKyTaiKhoan(temp);
            if (kq == 1)
            {
                lblThongBao.Text = "Đăng ký thành công !";
            }
            else
            {
                lblThongBao.Text = "Đăng ký thất bại !";
            }
            if (kq == 0)
            {
                lblThongBao.Text = "trung ten";
            }
            
        }
    }
}
